﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>
    <meta charset="utf-8">
    <title>btable</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    
	<!-- bootstrap -->
	<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
	<link href="css/bootstrap.min.css" rel="stylesheet">
	<script src="js/bootstrap.min.js"></script>
	
	<script type="text/javascript" src="plugins/layui/layui.js"></script>
    <link rel="stylesheet" href="plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="css/btable.css" />
	<link href="css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.8.3.js"></script>
    <script src="js/bootstrap.min.js"></script>
	<script type="text/javascript">
    $(document).ready(function() {
		var url = "<%=request.getContextPath()%>/select.do";
		$.post(
			//路径
			url,
			$("form").serialize(),
			//回调函数
			function(data) {
				$("#unamename").val(data.unamename);
				$("#upassword").val(data.upassword);
				$("#uphone").val(data.uphone);
				$("#ucard").val(data.ucard);
				$("#yinmount").val(data.yinmount);
				$("#uamount").val(data.uamount);
				if((data.usex)==("男")){
					$("#usex").attr("checked","checked");
				}else{
					$("#usex1").attr("checked","checked");
				}
			},
			//返回类型
			"json"
		);
	});
    function fang() {
    	var url = "<%=request.getContextPath()%>/yupdate.do";
		$.post(
			//路径
			url,
			$("form").serialize(),
			//回调函数
			function(data) {
				if(data=="1"){
					alert("修改成功！");	
				}else{
					alert("修改失败！");
				}
			},
			//返回类型
			"json"
		);
		alert("修改成功！");	
	}
    </script>
</head>

<body style=" background-color: gainsboro;">

    <div style="margin:0px; background-color: white; margin:0 10px;">
        <div id="content" style="width: 100%;height: 533px;">
			<!-- 搭建显示页面 -->
		<div class="container">
	
		<div class="row">
			<h1 align="center">个人详细信息</h1>
		</div>
		<!-- 显示表格数据 -->
		<div class="row">
			<div class="col-md-12">
				<form action="" method="post">
				<table class="table table-hover">
					<tr>
						<td>用户名</td><!-- readonly="readonly" disabled="disabled" -->
						<td>
							<input type="text" id="unamename" readonly="readonly"  name="unamename" value=""/>
							<input type="hidden" id="yinmount"  name="yinmount" value=""/>
						</td>
					</tr>
					<tr>
						<td>密码</td>
						<td><input type="text" id="upassword" name="upassword" value=""/></td>
					</tr>
					<tr>
						<td>性别：</td>
						<td>
							<input type="radio" id="usex"  name="usex" value="男" />男
							<input type="radio" id="usex1" name="usex" value="女"  />女
						</td>
					</tr>
					<tr>
						<td>手机号码：</td>
						<td><input type="text" id="uphone" name="uphone" value=""/></td>
					</tr>
					<tr>
						<td>银行卡号:</td>
						<td><input type="text" id="ucard" name="ucard" value=""/></td>
					</tr>
					<tr>
						<td>账户余额：</td>
						<td>
							<input type="text" id="uamount" disabled="disabled" name="uamount" value=""/>
						</td>
					</tr>
					<tr>
						<td colspan="2" align="center">
							<button class="btn btn-primary btn-sm" onclick="fang()">提交</button>
						</td>
					</tr>
				</table>
				</form>
			</div>
		</div>
        </div>
		</div>
    </div>
	
</body>

</html>